Week 2 Session 2

Step-by-step analysis: Gubin, Matthew M et al. “High-Dimensional Analysis Delineates Myeloid and Lymphoid Compartment Remodeling during Successful Immune-Checkpoint Cancer Therapy.” Cell 175.4 (2018): 1014-1030.e19.

Loading Packages and Seurat Object

Load Packages

# In case multest and metap are not installed:
# install.packages('BiocManager')
# BiocManager::install('multtest')
# install.packages('metap')
library(plyr)
library(Matrix)
library(Seurat)
library(ggplot2)
library(cowplot)
library(metap)
library(multtest)

Load Seurat Object

sobj<-readRDS(file="SingleCellCourseSeuratObject_Wk2S1.rds")

Identify Conserved Cell Type Markers

To identify canonical cell type marker genes that are conserved across conditions, we provide the FindConservedMarkers function. This function performs differential gene expression testing for each dataset/group and combines the p-values using meta-analysis methods from the MetaDE R package. For example, we can calculated the genes that are conserved markers irrespective of treatment condition in cluster XXX (XXX cells).

#ident.1 = cluster number. Here we are finding the markers for cluster 1
conservedmarkersAll<-FindConservedMarkers(sobj, ident.1 = 1, grouping.var = "treatment", verbose =FALSE)
conservedmarkersAll$clusters <- 1
#Creating a loop here that goes through the rest of the clusters, takes ~10 minutes to run. Results provided in class.
for (i in 2:12){
  conservedmarkers<-FindConservedMarkers(sobj, ident.1 = i, grouping.var = "treatment", verbose =FALSE)
  conservedmarkers$clusters <- i
  conservedmarkersAll <- rbind(conservedmarkersAll,conservedmarkers)
}

#save results as a CSV file 
write.csv(conservedmarkersAll, file="conservedmarkersAll.csv")

To retrieve a list of 40 markers for a given cluster, say cluster 3:

head(rownames(conservedmarkersAll[conservedmarkersAll$clusters==3,]), n=40)
##  [1] "FTH11"    "SLPI2"    "ARG12"    "CD141"    "CSTB1"    "CEBPB1"  
##  [7] "FCGR2B2"  "INHBA"    "FTL12"    "GRINA"    "LY6I2"    "PRDX51"  
## [13] "SLC7A112" "LGALS31"  "F101"     "MMP12"    "CLEC4D1"  "FCGR32"  
## [19] "CTSL2"    "ASS12"    "SOD21"    "PLIN21"   "CTSS2"    "RPL13A2" 
## [25] "CXCL162"  "CLEC4N1"  "HILPDA"   "ESD1"     "SGK1"     "CAPG1"   
## [31] "MGST11"   "IL1RN1"   "PRDX61"   "FCER1G2"  "CYBB1"    "H2.AA2"  
## [37] "MIF"      "BST11"    "RPS111"   "BNIP31"

Cell Type Identification from Marker Genes

DimPlot(sobj, reduction = "umap", pt.size = 0.1,label=TRUE) + ggtitle(label = "UMAP")

Identify Myeloid and Lymphoid Clusters

Myeloid and Lymphoid Markers
FeaturePlot(sobj, features = c("ADGRE1","CD3D","CD4","CD8B1","FOXP3","ITGAE","NCR1","S100A9","SIGLECH"), reduction = "umap", pt.size = 0.1)

Label Myeloid and Lymohid Cells

Using the markers from above, we are able to identify the cell lineage of two large clusters.

sobj@meta.data$cell_lineage<- ifelse(sobj@meta.data$seurat_clusters == 12, "Doublets",
                              ifelse(sobj@meta.data$seurat_cluster %in%c(2,4,5,6,8),"Lymphoid","Myeloid"))
DimPlot(sobj,group.by="cell_lineage")

Identify Myeloid Cell Subypes

Macrophage and Monocyte Markers

Macropahge and Monocyte Genes identified in Gubin, Matthew M et al

Markers: CD11c (ITGAX), CD64 (FCGR1), CD11B (ITGAM), CD14

FeaturePlot(sobj, features = c("ITGAX","FCGR1","ITGAM","CD14"), reduction = "umap", pt.size = 0.1)

Cluster 0 - Tissue Assoicated Macrophages

Markers: CD273 (PDCD1LG2), CD192 (CCR2), CD115 (CSF1R), CD14

FeaturePlot(sobj, features=c("PDCD1LG2","CCR2","CSF1R","CD14"))

Cluster 1 - M2 Macrophage

Markers: CD64 (FCGR1), CD206 (MRC1), CD14, FCER1G

FeaturePlot(sobj, features=c("FCGR1","MRC1","CD14","FCER1G"))

Cluster 3 - M1 Macrophage

Markers: CD16 (FCGR3), CD32 (FCGR2B), NOS2, CD86

FeaturePlot(sobj, features=c("FCGR3","FCGR2B","NOS2","CD86"))

Cluster 11 - Monocytes

Markers: CD115 (CSF1R), CD44, CD45 (SPN), CXCR1, CD31 (PECAM1), CCR2

FeaturePlot(sobj, features=c("CSF1R","CD44","SPN","CX3CR1","PECAM1","CCR2"))

Cluster 7 - DC Cells

Markers: CD197 (CCR7), CD24A, CD205 (LY75), CD11C (ITGAX)

FeaturePlot(sobj,features=c("CCR7","CD24A","LY75","ITGAX","FLT3","CLEC9A"))

Cluster 9 - Neutrophils
FeaturePlot(sobj, features = c("S100A9","CD24A","TNF","CD274"), reduction = "umap", pt.size = 0.1)

Cluster 10 - P DCs
FeaturePlot(sobj, features = c("PTPRC","BST2","SIGLECH"), reduction = "umap", pt.size = 0.1)

Label Myeloid Cell Types

sobj<- RenameIdents(sobj, `0` = "TAM", `1` = "M2 Macro", 
  `3` = "M1 Macro", `11` = "Monocytes", `7` = "DC", `9` = "Neurtophils",  `10` = "pDC")
DimPlot(sobj, reduction = "umap", pt.size = 0.1,label=TRUE) + ggtitle(label = "UMAP")

Identify Lymphoid Cell Types

Markers: CD3e - T cells

FeaturePlot(sobj, features=c("CD3E"))

Cluster 2 - CD4 T Cells

Markers: CD4 T cells

FeaturePlot(sobj, features=c("CD4"))

Cluster 8 - Tregs

Markers: FOXP3, CD4

FeaturePlot(sobj, features=c('FOXP3','CD4'))

Cluster 5 - CD8 T Cells

Markers: CD3E, CD8A, CD8B1

FeaturePlot(sobj, features=c("CD3E", "CD8A","CD8B1"))

Cluster 4 - NK Cells

Markers: CD7,NCR1

FeaturePlot(sobj, features=c("CD7","NCR1"))

Cluster 6 - Mki67hi CD4 T Cells

Markers: CD4, MKI67

FeaturePlot(sobj, features=c("CD4","MKI67"))

Label Myeloid Cell Types

sobj<- RenameIdents(sobj, `0` = "TAM", `1` = "M2 Macro", 
  `3` = "M1 Macro", `11` = "Monocytes", `7` = "DC", `9` = "Neurtophils",  `10` = "pDC",
  `12`="Doublets", `6`="Mki67hi CD4 T Cells", `4`= "NK Cells", `5`="CD8 T cells",`8`="Tregs",
  `2`="CD4 T cells")
DimPlot(sobj, reduction = "umap", pt.size = 0.1,label=TRUE) + ggtitle(label = "UMAP")

Save Seurat Object

saveRDS(sobj,file="SingleCellCourseSeuratObject_Wk2S2.rds")